﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StudentHrSign.aspx.cs"
    Inherits="ZX.WebApp.Crm.StudentHrSign" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Styles/base.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/extendTable.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.json-2.2.js" type="text/javascript"></script>
    <script src="../Scripts/Jquery.form.js" type="text/javascript"></script>
    <script src="../Scripts/Public.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        //alert(getPar1("key"));
        //全选取消按钮函数，调用样式如：
        function checkAll(iName, chkState) {
            $("." + iName + " input").attr("checked", chkState);
        }
        function checkSel() {
            if ($("#ddlClass").val() == "" || $("#ddlClass").val() == "--请选择班级--") {
                alert("请选择班级");
                $("#ddlClass").focus();
                return false;
            }
        }
    </script>
    <style type="text/css">
        a
        {
            text-decoration: none;
            color: #4e84b5;
        }
        .r
        {
            color: Red;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="content">
            <h3>
                查询</h3>
            <table class="table1" id="table1">
                <tr>
                    <th class="width10">
                        <span>企业名称</span>
                    </th>
                    <td class="width20">
                        <input type="text" runat="server" id="CustomerName" class="width60" />
                    </td>
                    <th class="width10">
                        <span>学员姓名</span>
                    </th>
                    <td class="width20">
                        <input type="text" runat="server" id="StudentName" class="width60" />
                    </td>
                    <th class="width10">
                        <span>班级名称</span>
                    </th>
                    <td class="width20">
                        <input type="text" runat="server" id="ClassNo" class="width60" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>业绩归属</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="ddlDeptName" runat="server" AppendDataBoundItems="true" CssClass="width65">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <th>
                        <span>客户经理</span>
                    </th>
                    <td>
                        <input id="CustomerMgrName" runat="server" class="width60" />
                    </td>
                    <th>
                        <span>性别</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="ddlSex" runat="server" CssClass="width65">
                            <asp:ListItem Value=""></asp:ListItem>
                            <asp:ListItem Value="1">男</asp:ListItem>
                            <asp:ListItem Value="0">女</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>是否已分班</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="ddlIsPartClass" runat="server" CssClass="width65">
                            <asp:ListItem Value=""></asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                        </asp:DropDownList>
                    </td><td colspan="4">
                       &nbsp;&nbsp; <asp:Button runat="server" ID="btnCheck" OnClick="btnCheck_Click" Text="查询" CssClass="btnCheck" Width="58px"/>
                    </td>
                </tr>
          
                <tr>
                    <td align="center">
                        <input id="chkAll" name="chkAll" type="checkbox" onclick="checkAll('chk1',this.checked);" />全选/全不选
                    </td>
                    <td colspan="5">
                        班级名称：<asp:DropDownList ID="ddlClass" ForeColor="#333333" AppendDataBoundItems="true"
                            runat="server">
                            <asp:ListItem Value="--请选择班级--"></asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button runat="server" ID="btnPart" OnClick="btnPart_Click"
                            Text="分班" CssClass="btnCheck" Width="58px" OnClientClick="return checkSel()" />
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        &nbsp;&nbsp;总人数：<span class="r"><%=totalNum%></span>人 &nbsp;&nbsp;已分班：<span class="r"><%=partNum %></span>人
                        &nbsp;&nbsp;未分班：<span class="r"><%=noPartNum %></span>人 &nbsp;&nbsp;企业：<span class="r"><%=customerNum %></span>家
                    </td>
                </tr>
            </table>
            <table id="tbReturn" class="tableContent" style="width: 100%; text-align: center"
                border="1">
                <tr style='display: <%=(gvHead=="1") ?"":"none"%>;'>
                    <th width="60px">
                        姓名
                    </th>
                    <th width="60px">
                        性别
                    </th>
                    <th width="260px">
                        企业名称
                    </th>
                    <th width="60px">
                        身高
                    </th>
                    <th width="60px">
                        年龄
                    </th>
                    <th width="120px">
                        业绩归属
                    </th>
                    <th width="60px">
                        客户经理
                    </th>
                    <th width="60px">
                        期数
                    </th>
                    <th width="60px">
                        班级
                    </th>
                    <th width="60px">
                        班主任
                    </th>
                    <th width="60px">
                        班主任手机
                    </th>
                </tr>
                <tr>
                    <td style="height: 16px; text-align: center" colspan="10">
                        <asp:GridView ID="gvStudent" ToolTip="点击表头可以排序" runat="server" AutoGenerateColumns="False"
                            AllowSorting="True" OnSorting="gvStudent_Sorting" Width="100%">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkSel" CssClass="chk1" runat="server" /><asp:HiddenField ID="hdnId"
                                            runat="server" Value='<%#Eval("ID") %>'></asp:HiddenField>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="StudentName" SortExpression="StudentName" HeaderText="姓名">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Sex" HeaderText="性别" SortExpression="Sex">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="CustomerName" HeaderText="企业名称" SortExpression="CustomerName">
                                    <ItemStyle Width="260px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Stature" HeaderText="身高" SortExpression="Stature">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Age" HeaderText="年龄" SortExpression="Age">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="OrderDeptName" HeaderText="业绩归属" SortExpression="OrderDeptName">
                                    <ItemStyle Width="120px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="AddUserName" HeaderText="客户经理" SortExpression="AddUserName">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="TermName" HeaderText="期数" SortExpression="TermName">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ClassNo" HeaderText="班级" SortExpression="ClassNo">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="UName" HeaderText="班主任" SortExpression="UName">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="GangerTel" HeaderText="班主任手机" SortExpression="GangerTel">
                                    <ItemStyle Width="60px" />
                                </asp:BoundField>
                            </Columns>
                            <FooterStyle CssClass="FooterStyle" />
                            <RowStyle CssClass="RowStyle" />
                            <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                            <PagerStyle CssClass="PagerStyle" />
                            <SelectedRowStyle CssClass="SelectedRowStyle" />
                            <HeaderStyle CssClass="HeaderStyle" />
                            <EditRowStyle CssClass="EditRowStyle" />
                            <AlternatingRowStyle CssClass="AltRowStyle" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
